package servidor;

import java.io.IOException;
import java.io.PrintStream;
import java.io.PrintWriter;
import java.net.InetAddress;
import java.net.Socket;
import java.net.UnknownHostException;
import java.nio.ByteBuffer;
import java.util.Scanner;

public class Cliente {

	
	
	public static void main(String [] args){
		try {
			//10.131.111.116
			Socket cliente = new Socket("10.131.111.77",1000);
			System.out.println("Cliente conectado...");
			
			
			//Socket cliente = new Socket("10.131.111.138",1000);
			
			//Le do teclado
			
			System.out.print("Digite a mensagem: ");
			Scanner scanner = new Scanner(System.in);
			
			
			PrintStream out = new PrintStream(cliente.getOutputStream());
			
			while(scanner.hasNextLine())
				out.println(scanner.nextLine());
			
			out.close();
			scanner.close();
			cliente.close();
			
		//	cliente.se
		} catch ( IOException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
		
	}

}
